package models

import (
	"time"
)

type BatchAudiencePackage struct {
	ID           uint      `gorm:"primaryKey;autoIncrement;not null"`
	Name         string    `gorm:"type:varchar(255);not null;comment:定向包名称"`
	MediaID      int       `gorm:"type:int(11);not null;default:0;comment:媒体平台ID"`
	Status       int       `gorm:"type:int(11);default:0;comment:状态"`
	Description  string    `gorm:"type:text;not null;comment:定向包描述"`
	LandingType  string    `gorm:"type:enum('EXTERNAL','ARTICLE','GOODS','DPA','STORE','AWEME','SHOP','APP_ANDROID','APP_IOS','LIVE','QUICK_APP','MICRO_GAME');not null;comment:定向包类型"`
	AudienceInfo string    `gorm:"type:json;default:NULL;comment:定向详情"`
	CompanyID    *uint     `gorm:"type:int(10);default:NULL;comment:公司ID"`
	GroupID      *uint     `gorm:"type:int(10);default:NULL;comment:部门ID"`
	CreateUID    *uint     `gorm:"type:int(10);default:NULL;comment:创建者UID"`
	UpdateUID    *uint     `gorm:"type:int(10);default:NULL;comment:更新者ID"`
	CreatedAt    time.Time `gorm:"default:CURRENT_TIMESTAMP;comment:创建时间"`
	UpdatedAt    time.Time `gorm:"default:CURRENT_TIMESTAMP;autoUpdateTime;comment:更新时间"`
	IsDeleted    bool      `gorm:"type:tinyint(1);default:0;comment:是否删除"`
}

func (BatchAudiencePackage) TableName() string {
	return "batch_audience_package"
}
